<?php

namespace app\index\controller;
use think\Db;

/**
 * 首页控制器
 * User: GQI
 * Date: 2017/10/27
 * Time: 15:49
 */

class Index extends Base
{
    /*首页文章列表*/
    public function index()
    {
        $art = Db::name('article')
            ->alias('a')
            ->join('cata c','a.cataid = c.cataid','left')
            ->order('time','desc')
            ->paginate(5);
        $this->assign('art',$art);
        return $this->fetch('index/index/index');
    }
}
